using UnityEngine;
using System.Collections;

/// \class  gkSpawnClassRandomSelector
/// \brief  Choose randomly a class to spawn in a class array
[AddComponentMenu("GK/Engine/Game/Spawn/gkSpawnClassRandomSelector")]
public class gkSpawnClassRandomSelector : gkSpawnClassSelector
{
    /// The Class to spawn
    public GameObject[] SpawnClasses;

    /// \brief  Select a class to spawn
    public override GameObject SelectSpawnClass()
    {
		int iSelectSpawnClassIndex;
		
	    // Select the next spawn class index
	    iSelectSpawnClassIndex = Random.Range(0, SpawnClasses.Length - 1);

	    return SpawnClasses[iSelectSpawnClassIndex];
    }
}